﻿<%@ Page Language="C#" MasterPageFile="~/MasterPages/MasterPage2.master" AutoEventWireup="true" CodeFile="Admin_ThongKeKhuyenMaiSanPhamTheoNam.aspx.cs" Inherits="ChucNang_Admin_Admin_ThongKeKhuyenMaiSanPhamTheoThang" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<h2>THỐNG KÊ TÌNH HÌNH KHUYẾN MÃI CỦA SẢN PHẨM THEO NĂM</h2>
    Chọn sản phẩm: <asp:DropDownList ID="dropdownlistSanPham" runat="server" 
        DataSourceID="ObjectDataSource1" DataTextField="TenSP" DataValueField="Id">
    </asp:DropDownList>
    <br />
    Chọn năm&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :
    <asp:DropDownList ID="dropdownlistNam" runat="server" 
        DataSourceID="SqlDataSource1" DataTextField="Nam" DataValueField="Nam">
    </asp:DropDownList>
    <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <asp:Button ID="btnThongKe" runat="server" Text="Thống kê" 
        onclick="btnThongKe_Click" />
    <br />
    <center>
        <br />
        <asp:Label ID="lbTenSanPham" runat="server" Text="Label" Visible="False"></asp:Label>
        <br />
        <asp:Image ID="imgSanPham" runat="server" Height="150px" Visible="False" 
            Width="150px" />
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
            BackColor="White" BorderColor="#CC9966" BorderStyle="None" BorderWidth="1px" 
            CellPadding="4">
        <RowStyle BackColor="White" ForeColor="#330099" />
        <Columns>
            <asp:BoundField DataField="NgayBatDau" HeaderText="Ngày Khuyến Mãi" />
            <asp:BoundField DataField="TenHinhThuc" HeaderText="Hình Thức" />
            <asp:BoundField DataField="NoiDung" HeaderText="Nội Dung Khuyến Mãi" />
            <asp:BoundField DataField="NgayKetThuc" HeaderText="Ngày Kết Thúc" />
        </Columns>
        <FooterStyle BackColor="#FFFFCC" ForeColor="#330099" />
        <PagerStyle BackColor="#FFFFCC" ForeColor="#330099" HorizontalAlign="Center" />
        <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="#663399" />
        <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="#FFFFCC" />
    </asp:GridView>
        <br />
    </center>
&nbsp;<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
        DeleteMethod="Delete" InsertMethod="Insert" 
        OldValuesParameterFormatString="original_{0}" SelectMethod="SANPHAM_LayTatCa" 
        TypeName="DataDSTableAdapters.SANPHAMTableAdapter" UpdateMethod="Update">
        <DeleteParameters>
            <asp:Parameter Name="Original_Id" Type="Int32" />
        </DeleteParameters>
        <UpdateParameters>
            <asp:Parameter Name="MaSP" Type="String" />
            <asp:Parameter Name="TenSP" Type="String" />
            <asp:Parameter Name="MoTa" Type="String" />
            <asp:Parameter Name="HinhAnh" Type="String" />
            <asp:Parameter Name="NhaSanXuat" Type="String" />
            <asp:Parameter Name="SoLuong" Type="Int32" />
            <asp:Parameter Name="TrangThaiBan" Type="Boolean" />
            <asp:Parameter Name="ThoiGianDang" Type="DateTime" />
            <asp:Parameter Name="DuocYeuThich" Type="Boolean" />
            <asp:Parameter Name="GiaCu" Type="Double" />
            <asp:Parameter Name="GiaMoi" Type="Double" />
            <asp:Parameter Name="DonViTinh" Type="String" />
            <asp:Parameter Name="Id_PhanLoai" Type="Int32" />
            <asp:Parameter Name="Original_Id" Type="Int32" />
        </UpdateParameters>
        <InsertParameters>
            <asp:Parameter Name="MaSP" Type="String" />
            <asp:Parameter Name="TenSP" Type="String" />
            <asp:Parameter Name="MoTa" Type="String" />
            <asp:Parameter Name="HinhAnh" Type="String" />
            <asp:Parameter Name="NhaSanXuat" Type="String" />
            <asp:Parameter Name="SoLuong" Type="Int32" />
            <asp:Parameter Name="TrangThaiBan" Type="Boolean" />
            <asp:Parameter Name="ThoiGianDang" Type="DateTime" />
            <asp:Parameter Name="DuocYeuThich" Type="Boolean" />
            <asp:Parameter Name="GiaCu" Type="Double" />
            <asp:Parameter Name="GiaMoi" Type="Double" />
            <asp:Parameter Name="DonViTinh" Type="String" />
            <asp:Parameter Name="Id_PhanLoai" Type="Int32" />
        </InsertParameters>
    </asp:ObjectDataSource>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:SMOConnectionString %>" 
        SelectCommand="sp_KHUYENMAI_LayTatCaNam" SelectCommandType="StoredProcedure">
    </asp:SqlDataSource>
    <br />
</asp:Content>

